package demo;

public class Test {
    public static void main(String[] args) throws InterruptedException {
        MySingleList mySingleList = new MySingleList();
        //mySingleList.creatLink();
        mySingleList.display();
        System.out.println("===========");
        System.out.println(mySingleList.contains(10));
        System.out.println("===========");
        System.out.println(mySingleList.size());
        System.out.println("===试尾插===");
        mySingleList.addLast(28);
        mySingleList.addLast(2);
        mySingleList.addLast(2);
        mySingleList.addLast(4);

        mySingleList.display();
        System.out.println("===试插入===");
        try{
            mySingleList.addIndex(0, 99);
        }catch (InterruptedException e) {
            e.printStackTrace();
        }
        mySingleList.display();
        System.out.println("===========");
        mySingleList.remove(99);
        mySingleList.display();
        System.out.println("===========");
        mySingleList.removeAllKey(2);
        mySingleList.display();


    }
}
